package cz.schovjan.proj.dto;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Size;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

/**
 * Trida reprezentuje clena kapely.
 * @author schovjan
 *
 */
public class Member implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private Integer id;
	
	@Size(max=50, message="Jméno má max. 50 znaků.")
	private String name;
	
	@Size(max=50, message="Příjmení má max. 50 znaků.")
	private String surname;
	
	@Size(max=50, message="Nick má max. 50 znaků.")
	private String nick;
	
	@Size(max=200, message="Funkce v kapele má max. 200 znaků.")
	private String job;
	
	@Size(max=20, message="Telefon má max. 20 znaků.")
	private String phone;
	
	@Size(max=50, message="Email má max. 50 znaků.")
	private String email;
	
	@DateTimeFormat(iso=ISO.DATE)
	private Date dateOfBirth;

	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getNick() {
		return nick;
	}

	public void setNick(String nick) {
		this.nick = nick;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getDateOfBirth() {
		return dateOfBirth;
	}

	public void setDateOfBirth(Date dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}

	@Override
	public String toString() {
		return "Member [id=" + id + ", name=" + name + ", surname=" + surname
				+ ", nick=" + nick + ", job=" + job + ", phone=" + phone
				+ ", email=" + email + ", dateOfBirth=" + dateOfBirth + "]";
	}

}
